package 工厂模式;

import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 根据配置文件和工厂模式创建对象
 */
public class PropertiesFactory {
    private  static ConcurrentHashMap<String,Object> singletonObjects;

    static {
        try {
            Properties properties=new Properties();
            InputStream resourceAsStream = PropertiesFactory.class.getClassLoader().getResourceAsStream("entity.properties");
            properties.load(resourceAsStream);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
